<template>
  <div class="container">
    <div id="siderbar">
      <ul>
        <li>
          <router-link to="/UserCenter/UserInfo">个人信息</router-link>
        </li>
        <li>
          <router-link to="/UserCenter/UserSettings">用户设置</router-link>
        </li>
      </ul>
    </div>
    <div class="main-body">
      <router-view :userData="userData"></router-view>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userData: {
        name: '张三',
        gender: '男',
        phone: '13455556666'
      }
    };
  }
};
</script>

<style>
.container {
  display: flex;
  min-height: 100vh;
  width: 100%;


}

#siderbar {
  width: 250px;
  height: 100%;
  background: #007bff;
  padding: 20px;
  float: left;
}

#siderbar ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

#siderbar li {
  margin-bottom: 10px;
}

#siderbar li a {
  display: block;
  height: 40px;
  line-height: 40px;
  text-decoration: none;
  color: #fff;
  padding: 0 10px;
  border-radius: 4px;
}

#siderbar li a.router-link-active {
  background: #0056b3;
}

.main-body {
  flex: 1;
  height: 100%;
  width: 100%;
  background: #f5f5f5;
  padding: 20px;

}

#main {
  overflow: hidden;
  height: 100%;
}
</style>

